#include <iostream>
#include "vectorfunctions.h"

int insertgcd(float x[], int l)
{
	int i, j, nl=l;
	for(i=1;i<l;i++){
		for (j=l;j>i;--j)
			x[j]=x[j-1];				
		x[i]=gcd(x[i-1], x[i+1]);
		++l;
		++i;	
			}
return l;			
}

int main()
{
	int l, nl;
	float x[100];
	cout<<"Number of elements : ";
	cin>>l;
	readVector(x, l);
	printVector(x, l);
	nl = insertgcd(x, l);
	printVector(x, nl);
return 0;
}
